import request from '../utils/request'

/**
 * 获取首页轮播图
 * @returns
 */
export const getSwipers = () => {
  return request({
    method: 'GET',
    url: '/home/swiper',
  })
}

/**
 * 获取租房小组数据
 * @returns
 */
export const getGroups = () => {
  return request({
    method: 'GET',
    url: '/home/groups?area=AREA%7C88cff55c-aaa4-e2e0',
  })
}

/**
 * 获取咨询数据
 * @returns
 */
export const getNews = () => {
  return request({
    method: 'GET',
    url: '/home/news?area=AREA%7C88cff55c-aaa4-e2e0',
  })
}

/**
 * 根据城市名称查询该城市信息
 * @returns
 */
export const getAreaInfo = (name) => {
  return request({
    method: 'GET',
    url: `area/info?name=${name}`,
  })
}
